import type { PageGoods,Goods, QueryPageByGoods, Result } from "@/config/data/data"
import { get } from "./request"

/**
 * 根据分类分页查询商品信息
 * @param data 参数对象
 * @returns 多条数据
 */
export const ReqSelectPageGoods = (data:QueryPageByGoods):Promise<Result<PageGoods[]>> => get("/goods/page/state",data)

/**
 * 根据id查询商品信息
 * @param data -id 商品id
 * @returns 单条数据
 */
export const ReqSelectGoodsDetail = (data:{id:number}):Promise<Result<PageGoods>> => get("/goods/detail",data)